package com.java.test.system.templatemember.entity;

import lombok.Data;
import org.springframework.jdbc.core.RowMapper;

import java.sql.Date;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Entity
 *
 * @author lijie1
 * @date 2020/6/30 0030
 */
@Data
public class TemplateEntity implements RowMapper<TemplateEntity> {
    private Long id;//id
    private String name;//名称
    private String version;//版本
    private String url;//url地址
    private String terminal;//模板
    private String areaId;//地区id
    private String language;//语言
    private String operation;//操作人
    private Date modifyTime;//修改时间
    private Date createTime;//创建时间
    private int status;//状态
    private String areaName;//地区名称
    private String terminalName;//模板名称
    private String languageName;//语言名称

    @Override
    public TemplateEntity mapRow(ResultSet resultSet, int i) throws SQLException {
        TemplateEntity info = new TemplateEntity();
        info.setId(resultSet.getLong("id"));
        info.setModifyTime(resultSet.getDate("modifyTime"));
        info.setOperation(resultSet.getString("operation"));
        info.setUrl(resultSet.getString("url"));
        info.setStatus(resultSet.getInt("status"));
        info.setCreateTime(resultSet.getDate("createTime"));
        info.setName(resultSet.getString("name"));
        info.setVersion(resultSet.getString("version"));
        info.setTerminal(resultSet.getString("terminal"));
        info.setAreaId(resultSet.getString("area"));
        info.setLanguage(resultSet.getString("language"));
        return info;
    }
}
